package com.imooc.sidney.player;

import java.util.Objects;

/**
 * @author Sidney 2018/6/4.
 */
public class Song {
    private String songId;
    private String songName;
    private String singer;

    public Song() {
    }

    public Song(String songId, String songName, String singer) {
        this.songId = songId;
        this.songName = songName;
        this.singer = singer;
    }

    public String getSongId() {
        return songId;
    }

    public void setSongId(String songId) {
        this.songId = songId;
    }

    public String getSongName() {
        return songName;
    }

    public void setSongName(String songName) {
        this.songName = songName;
    }

    public String getSinger() {
        return singer;
    }

    public void setSinger(String singer) {
        this.singer = singer;
    }

    @Override
    public String toString() {
        return "Song{" + "songId='" + songId + '\'' + ", songName='" + songName + '\''
                + ", singer='" + singer + '\'' + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        Song song = (Song) o;
        return Objects.equals(songId, song.songId) && Objects.equals(songName, song.songName)
                && Objects.equals(singer, song.singer);
    }

    @Override
    public int hashCode() {
        return Objects.hash(songId, songName, singer);
    }
}
